package club.lovety.spring.demo.controller;


import club.lovety.annotation.YxtAutowired;
import club.lovety.annotation.YxtController;
import club.lovety.annotation.YxtRequestMapping;
import club.lovety.annotation.YxtRequestParam;
import club.lovety.spring.demo.service.DemoService;

import javax.servlet.http.HttpServletRequest;

/**
 * @author smc
 * @date 2019-01-07 16:09
 * @since
 **/
@YxtController
@YxtRequestMapping("demo")
public class YxtDemoController {


    @YxtAutowired
    private DemoService demoService;

    @YxtRequestMapping("helloworld")
    public String helloWorld(@YxtRequestParam("name") String name, HttpServletRequest request){
        return demoService.say(name);
    }

    @YxtRequestMapping("empty")
    public String empty(){
        return "empty";
    }

}
